import { AxiosAccount } from '../utils/http/request';
import { LoginForm } from '../interface/index';

enum Api {
  login = '/store-back/auth/login',
  logout = '/store-back/auth/logout',
}
//上传附件
export const upload = '/store-back/file/upload/image';

// 登录
export const Login = (data: LoginForm) =>
  AxiosAccount.request({
    url: Api.login,
    method: 'post',
    data,
  });
// 登出
export const Logout = () =>
  AxiosAccount.request({
    url: Api.logout,
    method: 'post',
  });
